package org.activequant.util.ib.marketscanners;
public enum ScanType {
 TOP_PERC_GAIN("TOP_PERC_GAIN", "Top % Gainers", "IND.US,STK,FUT.US,BOND,STOCK.NA,FUT.NA,STOCK.EU,FUT.EU,IND.EU,STOCK.HK,FUT.HK,IND.HK", false, true),
 TOP_PERC_LOSE("TOP_PERC_LOSE", "Top % Losers", "IND.US,STK,FUT.US,BOND,STOCK.NA,FUT.NA,STOCK.EU,FUT.EU,IND.EU,STOCK.HK,FUT.HK,IND.HK", false, true),
 MOST_ACTIVE("MOST_ACTIVE", "Most Active", "STK,FUT.US,BOND,SLB.US,STOCK.NA,FUT.NA,STOCK.EU,FUT.EU,STOCK.HK,FUT.HK", false, true),
 NOT_OPEN("NOT_OPEN", "Not Open", "STK,STOCK.NA,STOCK.EU,STOCK.HK", false, true),
 HALTED("HALTED", "Halted", "STK,FUT.US,STOCK.NA,FUT.NA,STOCK.EU,FUT.EU,STOCK.HK,FUT.HK", false, true),
 HOT_BY_PRICE("HOT_BY_PRICE", "Hot Contracts by Price", "STK", false, true),
 HOT_BY_VOLUME("HOT_BY_VOLUME", "Hot Contracts by Volume", "STK", false, true),
 HIGH_DIVIDEND_YIELD_IB("HIGH_DIVIDEND_YIELD_IB", "High Dividend Yield", "STK,STOCK.NA,STOCK.EU,STOCK.HK", true, true),
 TOP_TRADE_COUNT("TOP_TRADE_COUNT", "Top Trade Count", "STK,STOCK.NA,STOCK.EU,STOCK.HK", false, true),
 TOP_TRADE_RATE("TOP_TRADE_RATE", "Top Trade Rate", "STK,FUT.US,BOND,STOCK.NA,FUT.NA,STOCK.EU,FUT.EU,STOCK.HK,FUT.HK", false, true),
 TOP_PRICE_RANGE("TOP_PRICE_RANGE", "Top Price Range", "STK", false, true),
 HOT_BY_PRICE_RANGE("HOT_BY_PRICE_RANGE", "Hot By Price Range", "STK", false, true),
 TOP_VOLUME_RATE("TOP_VOLUME_RATE", "Top Volume Rate", "STK,STOCK.NA,STOCK.EU,STOCK.HK", false, true),
 TOP_OPEN_PERC_GAIN("TOP_OPEN_PERC_GAIN", "Top % Gainers Since Open", "STK", false, true),
 TOP_OPEN_PERC_LOSE("TOP_OPEN_PERC_LOSE", "Top % Losers Since Open", "STK", false, true),
 HIGH_OPEN_GAP("HIGH_OPEN_GAP", "Top Close-to-Open % Gainers", "STK", false, true),
 LOW_OPEN_GAP("LOW_OPEN_GAP", "Top Close-to-Open % Losers", "STK", false, true),
 HIGH_OPT_IMP_VOLAT("HIGH_OPT_IMP_VOLAT", "Highest Option Imp Vol", "STK,IND.US,IND.EU,IND.HK", true, true),
 LOW_OPT_IMP_VOLAT("LOW_OPT_IMP_VOLAT", "Lowest Option Imp Vol", "STK,IND.US,IND.EU,IND.HK", true, true),
 TOP_OPT_IMP_VOLAT_GAIN("TOP_OPT_IMP_VOLAT_GAIN", "Top Option Imp Vol % Gainers", "STK,IND.US,IND.EU,IND.HK", true, true),
 TOP_OPT_IMP_VOLAT_LOSE("TOP_OPT_IMP_VOLAT_LOSE", "Top Option Imp Vol % Losers", "STK,IND.US,IND.EU,IND.HK", true, true),
 HIGH_OPT_IMP_VOLAT_OVER_HIST("HIGH_OPT_IMP_VOLAT_OVER_HIST", "High Option Imp Vol Over Historical", "STK,IND.US,IND.EU,IND.HK", true, true),
 LOW_OPT_IMP_VOLAT_OVER_HIST("LOW_OPT_IMP_VOLAT_OVER_HIST", "Low Option Imp Vol Over Historical", "STK,IND.US,IND.EU,IND.HK", true, true),
 OPT_VOLUME_MOST_ACTIVE("OPT_VOLUME_MOST_ACTIVE", "Most Active By Opt Volume", "STK,IND.US,STOCK.HK", true, true),
 OPT_OPEN_INTEREST_MOST_ACTIVE("OPT_OPEN_INTEREST_MOST_ACTIVE", "Most Active By Opt Open Interest", "STK,IND.US,STOCK.HK", true, true),
 HIGH_OPT_VOLUME_PUT_CALL_RATIO("HIGH_OPT_VOLUME_PUT_CALL_RATIO", "High Opt Volume P/C Ratio", "STK,IND.US,STOCK.HK", true, true),
 LOW_OPT_VOLUME_PUT_CALL_RATIO("LOW_OPT_VOLUME_PUT_CALL_RATIO", "Low Opt Volume P/C Ratio", "STK,IND.US,STOCK.HK", true, true),
 HIGH_OPT_OPEN_INTEREST_PUT_CALL_RATIO("HIGH_OPT_OPEN_INTEREST_PUT_CALL_RATIO", "High Opt Open Interest P/C Ratio", "STK,IND.US,STOCK.HK", true, true),
 LOW_OPT_OPEN_INTEREST_PUT_CALL_RATIO("LOW_OPT_OPEN_INTEREST_PUT_CALL_RATIO", "Low Opt Open Interest P/C Ratio", "STK,IND.US,STOCK.HK", true, true),
 HOT_BY_OPT_VOLUME("HOT_BY_OPT_VOLUME", "Hot By Opt Volume", "STK,IND.US,STOCK.HK", true, true),
 HIGH_SYNTH_BID_REV_NAT_YIELD("HIGH_SYNTH_BID_REV_NAT_YIELD", "High Synth Bid Rev Yield", "EFP", true, true),
 LOW_SYNTH_ASK_REV_NAT_YIELD("LOW_SYNTH_ASK_REV_NAT_YIELD", "Low Synth Ask Rev Yield", "EFP", true, true),
 HIGH_VS_13W_HL("HIGH_VS_13W_HL", "13-Week High", "STK", false, true),
 LOW_VS_13W_HL("LOW_VS_13W_HL", "13-Week Low", "STK", false, true),
 HIGH_VS_26W_HL("HIGH_VS_26W_HL", "26-Week High", "STK", false, true),
 LOW_VS_26W_HL("LOW_VS_26W_HL", "26-Week Low", "STK", false, true),
 HIGH_VS_52W_HL("HIGH_VS_52W_HL", "52-Week High", "STK", false, true),
 LOW_VS_52W_HL("LOW_VS_52W_HL", "52-Week Low", "STK", false, true),
 HIGH_BOND_ASK_YIELD("HIGH_BOND_ASK_YIELD", "Highest Ask Yield", "BOND", false, true),
 LOW_BOND_BID_YIELD("LOW_BOND_BID_YIELD", "Lowest Bid Yield", "BOND", false, true);
 
 private String scanCode;
 private String displayName;
 private String instruments;
 private boolean absoluteColumns;
 private boolean supportsSorting;
 
 public String getScanCode() {
	return scanCode;
}

public String getDisplayName() {
	return displayName;
}

public String getInstruments() {
	return instruments;
}

public boolean isAbsoluteColumns() {
	return absoluteColumns;
}

public boolean isSupportsSorting() {
	return supportsSorting;
}

public String toString() {
		return scanCode;
 }
 
 ScanType(String scanCode, String displayName, String instruments, boolean absoluteColumns, boolean supportsSorting) {
		this.scanCode = scanCode;
		this.displayName = displayName;
		this.instruments = instruments;
		this.absoluteColumns = absoluteColumns;
		this.supportsSorting = supportsSorting;
 }
 
 public static ScanType toClass(String value) {
	for(ScanType symbol: values()) {
		if(symbol.toString().equals(value)) {
			return symbol;
		}
	}
	throw new IllegalArgumentException("Value '"+value+"' not defined as constant.");
 }
}
